{template 'common/header'}
<title>小妖家</title>
<style type="text/css">
body {margin:0; font-family:'微软雅黑'; background:#FDFDFD;}
a{ text-decoration: none;}
.nav{color:#756868;font-size:14px;}
.row{width:100%;height:40px;margin-top:30px;}
.select  { border:none;height:25px;width:100%;color:#666;font-size:16px;}
.line{width:22%;height:40px;font-size:18px;margin-left: 10%;float:left;font-weight:bold;}
.sub{width:1%;height:40px;font-size:18px;float:left;line-height:40px;margin-right:10px;font-weight:bold;}
.info{float:left;width:55%;height:40px;font-size:14px;line-height:40px;}
.text{width:100%;height:40px;padding:5px;padding-left:2%;border:1px solid #e9e9e9;-webkit-appearance: none;}
</style>
<script type="text/javascript" src="../addons/ewei_shop/static/js/dist/area/cascade.js"></script>
<div id='container'></div>
<div style="width:100%;height:650px;margin-top:50px;">
    <div class="row">
    <div class="line">公司名称<br/><div class="nav">COMPANY</div></div>
    <div class="sub">:</div>
    <div class="info">{$_GPC['company']}</div>
    </div>
    <div class="row">
    <div class="line">产品品牌<br/><div class="nav">BRANDING</div></div>
    <div class="sub">:</div>
    <div class="info">{$_GPC['brandname']}</div>
    </div>
    <div class="row">
    <div class="line">产品名称<br/><div class="nav">NMAE</div></div>
    <div class="sub">:</div>
    <div class="info">{$_GPC['goodsname']}</div>
    </div>
    <div class="row">
    <div class="line">生产日期<br/><div class="nav">DATE</div></div>
    <div class="sub">:</div>
    <div class="info">{php echo date('Y-m-d H:i',$_GPC['production_time'])}</div>
    </div>
    <div class="row">
        <div class="line">所在省份<br/><div class="nav">PROVINCE</div></div>
        <div class="sub">:</div>
        <div class="info">
            <select id="sel-provance" onchange="selectCity();" class="select"><option value="" selected="true">所在省份</option></select>
        </div>
    </div>
    <div class="row">
        <div class="line">所在城市<br/><div class="nav">CITY</div></div>
        <div class="sub">:</div>
        <div class="info">
            <select id="sel-city" onchange="selectcounty()" class="select"><option value="" selected="true">所在城市</option></select>
        </div>
    </div>
    <div class="row">
        <div class="line">所在地区<br/><div class="nav">AREA</div></div>
        <div class="sub">:</div>
        <div class="info">
            <select id="sel-area" class="select"><option value="" selected="true">所在地区</option></select>
        </div>
    </div>
    <div class="row">
        <div class="line">详细地址<br/><div class="nav">DETIAL</div></div>
        <div class="sub">:</div>
        <div class="info">
        <textarea id="address" placeholder="请填写详细地址！！！" class="text"></textarea>
        </div>
    </div>
    <div class="row">
        <div class="line">门店名称<br/><div class="nav">SHOPNAME</div></div>
        <div class="sub">:</div>
        <div class="info">
        <textarea id="desc" placeholder="请填写门店名称！！！" class="text"></textarea>
        </div>
    </div>
</div>
    <div style="width:100%;height:100px;text-align: center;" id="myshop_submit"><img src="../addons/ewei_shop/template/mobile/default/static/images/queren.png"></div>
<script language="javascript">
require(['tpl', 'core'], function(tpl, core) {
        cascdeInit();
     $('#myshop_submit').click(function(){
            if($(this).attr('saving')=='1'){
                return;
            }
            $(this).attr('saving',1);
            if($('#desc').isEmpty()){
                 core.tip.show('请填写门店信息!');
                 return;
            }
            var data = {
                    auth_id: "{$_GPC['id']}",
                    qid:"{$_GPC['qid']}",
                    company: "{$_GPC['company']}",
                    brandname: "{$_GPC['company']}",
                    goodsname: "{$_GPC['goodsname']}",
                    production_time: "{$_GPC['production_time']}",
                    information: $('#desc').val(),
                    province: $('#sel-provance').val(),
                    city: $('#sel-city').val(),
                    area: $('#sel-area').val(),
                    address: $('#address').val(),
            }
            core.json('authenticity/list',{
                op:'post',
                data:data
             },function(postjson){
                 if(postjson.status==1){
                     location.href ='http://wx.lanxuevip.com/app/index.php?i=5&c=entry&do=detail&m=hx_lottery&id='+postjson.result.lottery_id+'&qid='+postjson.result.qid;
                 }
                 else{
                     $(this).removeAttr('saving');
                     core.tip.show('操作失败');    
                 }
            },true,true);
     });
})
</script>
{template 'common/footer'}